package com.qidian.blog.mapper;

import com.qidian.blog.pojo.BlogArticle;
import com.qidian.blog.pojo.BlogArticleContent;
import com.qidian.blog.pojo.BlogConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 郭浩
 * @Date 2022/10/10 18:35
 */
public interface BlogArticleMapper {
    List<BlogArticle> queryAll();

    int save(BlogArticle article);
    int saveContent(BlogArticleContent content);

    List<BlogArticle> queryByPage(@Param("start") int start, @Param("limit") int limit,@Param("article") BlogArticle article, @Param("timeStart")String timeStart,@Param("timeEnd")String timeEnd);
    int count(@Param("article") BlogArticle article,@Param("timeStart")String timeStart,@Param("timeEnd")String timeEnd);

    int saveTagsForArticle(@Param("articleId") Long articleId,@Param("tagId") Long tagId);

    BlogArticle queryById(Long articleId);

    int delete(BlogArticle blogArticle);

    List<BlogArticle> queryByCategoryId(Long id);



    int update(BlogArticle article);
    int updateContent(BlogArticleContent content);
    int deleteTags(Long articleId);
}
